home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5641 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: erich.triumf.ca!bennett
  2. From: bennett@erich.triumf.ca (P.Bennett)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Initialising structure members - help please!
  5. Date: 19 Feb 1996 22:13 PST
  6. Organization: TRIUMF: Tri-University Meson Facility
  7. Distribution: world
  8. Message-ID: <19FEB199622133419@erich.triumf.ca>
  9. References: <4gb8hn$3m8@news.mistral.co.uk>
  10. NNTP-Posting-Host: ftp.triumf.ca
  11. News-Software: VAX/VMS VNEWS 1.50    
  12.  
  13. In article <4gb8hn$3m8@news.mistral.co.uk>, mikebarnard@mistral.co.uk (Mike Barnard) writes...
  14. >Hi all.
  15. >I'm a learner. I am trying to create a function to display a list of
  16. >menu items using a doubly linked list. My problem is in initialising
  17. >the members of the individual menu items.
  18. <snippage>
  19. >Now, the fun (not) bit. I tried to initialise the items with...
  20. >one.number = 1;
  21. >one.description = "1.   Calculate a minefield";
  22.  
  23. You can't copy C strings with an "=".  You must use the strcpy() function.
  24.  
  25. Peter Bennett VE7CEI                | Vessels shall be deemed to be in sight
  26. Internet: bennett@triumf.ca         | of one another only when one can be
  27. Packet: ve7cei@ve7kit.#vanc.bc.ca   | observed visually from the other
  28. TRIUMF, Vancouver, B.C., Canada     |                          ColRegs 3(k)
  29. GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.